<?php

use App\Helpers\libs\Saying;
use App\Helpers\Price;
use App\Helpers\utils\WeChat\OfficialAccount;
use App\Helpers\Utils;
use App\Models\Sentence;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::namespace('App')->group(function () {
    Route::prefix('price')->group(function () {
        Route::get('history', 'PriceController@history');
    });
});

Route::namespace('Common')->group(function () {
    Route::prefix('wx')->group(function () {
        // 公众号接口
        Route::get('/', 'WeChatController@checkToken');
        // 公众号接收消息管理
        Route::post('/', 'WeChatController@reply');
    });
});

Route::get('test', function () {
    $s = new OfficialAccount();
    return $s->getMaterial();
});
